Design Patterns for Generic Programming in C++

نویسندگان

  • Alexandre Duret-Lutz
  • Thierry Géraud
  • Akim Demaille
چکیده

Generic programming is a paradigm whose wide adoption by the C++ community is quite recent. In this scheme most classes and procedures are parameterized, leading to the construction of general and efficient software components. In this paper, we show how some design patterns from Gamma et al. can be adapted to this paradigm. Although these patterns rely highly on dynamic binding, we show that, by intensive use of parametric polymorphism, the method calls in these patterns can be resolved at compile-time. In intensive computations, the generic patterns bring a significant speed-up compared to their classical peers.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Thematization Strategies in the Generic Moves of Research Article Introductions

Despite the heterogeneity of ideas regarding the definitions of genre, there are also common instances shared among scholars interested in particular aspects of the notion. Swales (1990) and Bhatia (1993) are primarily interested in the sociological and psychological aspects of genre's functioning and construction, respectively.. Swales analyzes the genre of 'article introduction', into four ge...

متن کامل

Patterns in Datatype-Generic Programming

Generic programming consists of increasing the expressiveness of programs by allowing a wider variety of kinds of parameter than is usual. The most popular instance of this scheme is the C++ Standard Template Library. Datatype-generic programming is another instance, in which the parameters take the form of datatypes. We argue that datatype-generic programming is sufficient to express essential...

متن کامل

Mathematical Programming Models for Solving Unequal-Sized Facilities Layout Problems - a Generic Search Method

 This paper present unequal-sized facilities layout solutions generated by a genetic search program named LADEGA (Layout Design using a Genetic Algorithm). The generalized quadratic assignment problem requiring pre-determined distance and material flow matrices as the input data and the continuous plane model employing a dynamic distance measure and a material flow matrix are discussed. Computa...

متن کامل

Design Patterns in Garbage Collection

This thesis presents an examination of design patterns within the context of garbage collection. Initially, I review garbage collection and design patterns. Four garbage collectors are then examined and the design patterns found described. Both domain speci c and generic patterns are described. The domain speci c patterns are TriColour and RootSet, the generic patterns are Adaptor, Facade, Iter...

متن کامل

USENIX Association Proceedings of the 6 th USENIX Conference on Object - Oriented Technologies and Systems

Generic programming is a paradigm whose wide adoption by the C++ community is quite recent. In this scheme most classes and procedures are parameterized, leading to the construction of general and efficient software components. In this paper, we show how some design patterns from Gamma et al. can be adapted to this paradigm. Although these patterns rely highly on dynamic binding, we show that, ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001